<template>
  <h1>文本相关指令</h1>
<p>{{info}}</p>
<h3>{{info}}</h3>
<h1>{{info+'早上好!'}}</h1>
  {{info}}
  <hr>
  <button @click="f()">我是按钮</button>
  <hr>
  <p v-text="info"></p>
  <p v-html="info"></p>
</template>

<script setup>
import {ref} from "vue";

const info=ref("测试文本");

const f=()=>{
  info.value='值变了';
  info.value='值<b>更新</b>了!'
}
</script>

<style scoped>

</style>